package entity

import (
	"time"

	"shqsoft.cn/pasnj/base"
)

//User 对公存款认定
type DGCK_RD struct {
	ID        int        `gorm:"AUTO_INCREMENT;primary_key;column:ID"`
	ZH        string     `gorm:"column:帐号;"`
	BANO      string     `gorm:"column:子帐号"`
	KHWD      string     `gorm:"column:开户网点;"`
	JGID      int        `gorm:"column:机构ID;"`
	BZ        string     `gorm:"column:币种;"`
	KM        string     `gorm:"column:科目;"`
	KHMC      string     `gorm:"column:客户名称"`
	KHRQ      *time.Time `gorm:"column:开户日期;type:date;"`
	QXR       *time.Time `gorm:"column:起息日;type:date;"`
	DQR       *time.Time `gorm:"column:到期日;type:date;"`
	CQ        string     `gorm:"column:存期;"`
	LL        *float64   `gorm:"column:利率;"`
	FUBL      *float64   `gorm:"column:浮动比例;"`
	JXFS      string     `gorm:"column:结息方式;"`
	ZHXZ      string     `gorm:"column:帐户性质;"`
	ZHZT      string     `gorm:"column:帐户状态"`
	XHR       *time.Time `gorm:"column:销户日;type:date;"`
	DQYE      *float64   `gorm:"column:当前余额;"`
	SRYE      *float64   `gorm:"column:上日余额"`
	KHRJ      *float64   `gorm:"column:开户日均;"`
	YRJ       *float64   `gorm:"column:月日均;"`
	JRJ       *float64   `gorm:"column:季日均;"`
	NRJ       *float64   `gorm:"column:年日均;"`
	TJLX      string     `gorm:"column:统计类型"`
	ZHTZXS    *float64   `gorm:"column:帐户调整系数;"`
	ZHTZXS2   *float64   `gorm:"column:帐户调整系数2;"`
	BZDM      string     `gorm:"column:币种代码;"`
	CQID      int        `gorm:"column:存期ID;"`
	ISDQZYCK  string     `gorm:"column:是否定期质押存款"`
	ISXYCK    string     `gorm:"column:是否协议存款"`
	ISJGQSYDK string     `gorm:"column:是否机关企事业贷款;"`
	ISDIVI    bool       `gorm:"column:ISDIVI;"`
	ISMR      bool       `gorm:"column:ISMR;"`
	FPNO      *int       `gorm:"column:FPNO"`
}

//TableName User用户表名
func (DGCK_RD) TableName() string {
	return "v_对公_分户帐"
}

func DGCK_RDEF() base.EntityFunc {
	return func() interface{} {
		entity := DGCK_RD{}
		return &entity
	}
}
func DGCK_RDESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []DGCK_RD
		return &entities
	}
}

func init() {
	dao := base.NewDefaultDao(DGCK_RDEF(), DGCK_RDESF(), nil)
	filter := base.DefaultFilter{
		FilterColName: "机构ID",
	}
	dao.Fileter = &filter
	base.DaoPoolObj.Put("DGCK_RD", dao)
}
